<script setup lang="ts">
defineProps({
  title: {
    type: String,
    default: '无',
  },
  content: {
    type: String,
    default: '无',
  },
  tags: {
    type: Array,
    default: [],
  },
  time: {
    type: String,
    default: '无',
  },
})
</script>
<template>
  <div class="studyCard">
    <div class="title">{{ title }}</div>
    <div class="content">{{ content }}</div>
    <div>
      <el-tag type="success" v-for="(item, index) in tags" :key="index">{{ item }}</el-tag>
    </div>
    <div class="time">{{ time }}</div>
  </div>
</template>
<style scoped lang="scss">
.studyCard {
  min-width: 750px;
  background-color: #fff;
  box-sizing: border-box;
  padding: 20px 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  .title {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
    cursor: pointer;
    &:hover {
      color: #1890ff;
    }
  }
  .content {
    cursor: pointer;
    color: rgba(0, 0, 0, 0.45);
  }

  .el-tag {
    margin-right: 10px;
    background-color: rgb(255, 214, 102);
    color: #fff;
  }
  .time {
    color: rgba(0, 0, 0, 0.45);
    margin-left: 20px;
  }
}
</style>
